package com.venutech.gongan.dao;

import com.baomidou.mybatisplus.plugins.Page;
import com.venutech.gongan.entity.EquipBindingWork;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface EquipBindingWorkMapper {
    //工单添加
    int insert(EquipBindingWork equipBindingWork);

    //根据id修改工单状态
    int updateEquipBindingWork(Integer ebw_id);

    //根据ID返回对象
    EquipBindingWork getById(Integer ebw_id);

    //分页查询所有信息
    List<EquipBindingWork> getInfo(String begintime, String endtime, Page<EquipBindingWork> page, @Param("temp_user_name") String temp_user_name,@Param("ebw_state") Integer ebw_state);

    int updateEquipBindWorkStatus(@Param("ebwId")int ebwId, @Param("workStatus") int workStatus);

    int updateEquipBindWorkStatusByPoleIdAndType(@Param("poleId")int poleId, @Param("workType") int workType, @Param("workStatus") int workStatus);

    EquipBindingWork getLatestWorkByPoleIdAndType(@Param("poleId") int poleId, @Param("workType") int workType);

    List<EquipBindingWork> getByPoleIdAndState(@Param("poleId") int poleId, @Param("state") int workState);

}
